<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>

<body>
  <!--
    v-once：一次性执行插值操作，当数据改变时，插值处的内容不会更新。
   -->

  <div id ="app">
    <h2>输入框的值: {{message}}</h2>
    <h2 v-once>v-once 输入框的值: {{message}}</h2>
    <input type="text" v-model="message">
  </div>

  <script src="../js/vue.js"></script>
  <script>
   //创建Vue实例,得到 ViewModel
   const vm = new Vue({
    el: '#app',
    data: {
      message: 'hello'
    },
    methods: {}
   });
  </script>
</body>

</html>
